using System;
using System.Reflection.Emit;
using Pine.SourceParser.Tree;

namespace Pine.CodeGen
{
	public static class ExtensionMethods
	{
		public static void GenerateBytecode(this Expression self, Context ctx, LocalBuilder lb) {
			CodeGenerator.ParseExpression(ctx, self, lb);
		}
		
		public static void GenerateBytecode(this Statement self, Context ctx) {
			CodeGenerator.ParseStatement(ctx, self);
		}
	}
}

